package com.zzedu.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzedu.domain.OrderSumRenewVO;
import com.zzedu.domain.ZzSchool;
import com.zzedu.domain.ZzStuRenewOrder;
import com.zzedu.domain.ZzStudent;
import com.zzedu.dto.OrderSumDTO;
import com.zzedu.dto.ZzStuRenewOrderDTO;
import com.zzedu.vo.ZzStuRenewOrderVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * (教育-学生)学生续费订单Service接口
 *
 * @author Mr.Wang
 * @date 2025-08-16
 */
public interface IZzStuRenewOrderService extends IService<ZzStuRenewOrder> {
    /**
     * 构造查询条件
     */
    public LambdaQueryWrapper<ZzStuRenewOrder> buildQuery(ZzStuRenewOrderDTO zzStuRenewOrderDTO);

    public List<ZzStuRenewOrderVO> convertVO(List<ZzStuRenewOrder> zzStuRenewOrderList);

    /**
     * 查询续费订单列表
     *
     * @param query 查询条件
     * @return 续费订单
     */
    public IPage<OrderSumRenewVO> orderSumList(OrderSumDTO query);

    /**
     * 根据账单汇总查询
     *
     * @param query
     * @return
     */
    public IPage<OrderSumRenewVO> orderSumListPayOrder(OrderSumDTO query);

    /**
     * 添加订单
     *
     * @param id
     * @param memberType
     * @param zzStudent
     * @param zzSchool
     * @param end
     * @param now
     */
    public void addOrder(Long id, Integer memberType, Integer orderType, ZzStudent zzStudent, ZzSchool zzSchool, LocalDateTime end, LocalDateTime now, boolean isExpire);

    /**
     * 废弃订单
     *
     * @param ids
     * @return
     */
    int abandonment(List<Long> ids);

    /**
     * 月度 订单报表
     *
     * @param query
     * @return
     */
    public IPage<OrderSumRenewVO> orderSumListPayOrderToMonth(OrderSumDTO query);
}
